pp108 : onapplicationselect Event

onapplicationselect Event


Fires every time the select() method of an application is called.

Syntax

Inline HTML <HTML onapplicationselect="handler()"...>
Event property application.onapplicationselect = handler


Event Information

To invoke Create an Application or call the select()method of the application.
Default Action Selects an application and initiates any action associated with this event.


Event Object Properties


Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query an event object for data.

Property Description
application Read-only. Object that denotes the XML definition of the application that is opened. This property is DEPRECATED. It is recommended to use the applicationDefinition property instead.
applicationDefinition Read-only. Object that denotes the XML definition of the application opened.
data Variant that contains data that is passed to the application as a second parameter to the select()method of the application component. If the select()method is as a result of a tree operation, then the data property contain the following properties in addition to custom properties.
exploreType String that denotes the type of the operation involved. It can be "expand" or "select".
menuItem Object that contains the XML reference of the TreeItem that caused the event.
srcApplication Read-only. Object that contains the source application that caused the event.


Example


The following example demonstrates the use of the onapplicationselect event.

//Script that calls the application's select() method in the parent page
application.select(newApplication, someData);
<!-- HTML definition in the new application opened -->
<HTML onapplicationselect="selectApplication()">
//Script for onapplicationselect function handler
function selectApplication()
{
    application.notify("Data :  " + event.data);
    application.notify("Explore type : " + event.exploreType);
    //Look at the application definition
    application.notify("Application Definition \n\n : " + application.event.applicationDefinition.xml);
}


Note: For onapplicationselect event to be fired for standalone applications and for applications loaded in iframe or in wizard steps, the URL should contain the data as query string with value as XML string. Example, /cordys/wcp/testonapplicationselect.htm?data="<data/>".

See Also


application